package me.tonywang.config;

import org.springframework.security.core.Authentication;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;

@Component("webSecurity")
public class WebSecurity {

// https://docs.spring.io/spring-security/site/docs/5.0.4.RELEASE/reference/htmlsingle/#el-access-web
    public boolean check(Authentication authentication) {
        System.out.println("authentication :" + authentication);
        return true;
    }

   public boolean  check(Authentication authentication, HttpServletRequest request){
         System.out.println("authentication :" + authentication);
        return true;
   }

    public boolean checkUserId(Authentication authentication, int id) {
        return true;
    }
}
